#ifndef HTTP_HTTP_REQUEST_BUILDER_H_
#define HTTP_HTTP_REQUEST_BUILDER_H_

#include <fermat/http/http_message_builder.h>
#include <fermat/http/http_request.h>
#include <memory>

namespace fermat {
namespace http {
	class RequestBuilder : public MessageBuilder
	{
	public:
		RequestBuilder();
		RequestBuilder(const Request& request);

		const Method method() const;

		std::string methodName() const;

		void setMethod(const Method& method);
		

		bool upgrade() const;

		void setUpgrade(bool upgrade);

		const std::string& url() const;

		void setUrl(const std::string& url);

		std::string requestLine() const;

		std::string toString() const;

		virtual bool isSendComplete();

		virtual bool sendMessage(std::string &mes);

	private:
		Method      _method;
		std::string _url;
	};

	typedef std::shared_ptr<RequestBuilder> RequestBuilderPtr;
}
}
#endif /* _http_Request_builder__ */